<?php //$this->load->view("partial/header"); ?>
<script type="text/javascript">
$(document).ready(function() 
{ 
	$('#update_tax_form').validate({
		submitHandler:function(form)
		{
			$(form).ajaxSubmit({
			success:function(response)
			{
				tb_remove();
				post_item_form_submit(response);
			},
			dataType:'json'
		});

		},
		errorLabelContainer: "#error_message_box",
 		wrapper: "li",
		rules: 
		{
			name:"required"
   		},
		messages: 
		{
			name:"<?php echo $this->lang->line('tax_name_required'); ?>"
		}
	});
});
</script>
<script type="text/javascript">
function delete_tax_items(row_id,tax_id)
{		
	var url = "<?php echo site_url("$controller_name/delete_tax_item")?>";
	$.post(url, { 'row_id': row_id,'tax_id': tax_id },function(response)
	{
		tb_remove();
		post_item_form_submit(response);
		
	},"json");
}

</script>
<div id="required_fields_message"><?php echo $this->lang->line('common_fields_required_message'); ?></div>
<ul id="error_message_box"></ul>
<?php
echo form_open('tax_configs/update_tax/',array('id'=>'update_tax_form'));
?>
<div id="title_bar">
	<div id="title" class="float_left"><?php echo $this->lang->line('tax_update').' '; ?></div>
	<div id="new_button">
		<table border=0>
			<tr>
				<td>
					<div class="field_row clearfix">	
						
						<div class='form_field'>
						<?php echo "<span><font color='red'>".$this->lang->line('tax_name')."</font></span>"; ?>
						<?php echo form_input(array(
						'name'=>'name',
						'id'=>'name',
						'value'=>$tax->name)
						);?>
						</div>
					</div>
				</td>
				<td>
					<div class="field_row clearfix">	
						<div class='form_field'>
						Exceeding
						<?php echo form_input(array(
						'name'=>'exceeding',
						'id'=>'exceeding',
						'size'=>'8',
						'value'=>$tax->exceeding)
						);?>
						%
						</div>
					</div>
				</td>
				<td>
				</td>
				<td>
				</td>
				<td>
					<?php
						echo form_submit(array(
						'name'=>'submit',
						'id'=>'submit',
						'value'=>$this->lang->line('tax_update'),
						'class'=>'submit_button')
						);
					?>		
				</td>
			</tr>
		</table>
		
	</div>
	<input id="hidden_tax" name="hidden_tax" value="<?php echo $tax->tax_id; ?>" type="hidden">
</div>
<div id="table_action_header">
	<ul>		
		<li class="float_right">
		<img src='<?php echo base_url()?>images/spinner_small.gif' alt='spinner' id='spinner' />		
		</li>
	</ul>
</div>
<div id="table_holder">
	<?php echo $manage; ?>
</div>

<?php
echo form_close();
?>
<div id="feedback_bar"></div>
<?php //$this->load->view("partial/footer"); ?>